<?php

$server = 'localhost';
$username = 'root';
$password = 'root';
$link = mysql_connect($server, $username, $password);
mysql_select_db('newphone');
$sql = 'SHOW TABLES';
$query = mysql_query($sql, $link);
while ($data = mysql_fetch_array($query)) {
    if ($data[0] != 'data') {
        if (mysql_query('INSERT INTO `data`(`cedula`, `telefono1`, `telefono2`) SELECT `C`,`D`,`E` FROM `' . $data[0] . '`', $link)) {
            print '<br>si' . $data[0];
        } else {
            print '<br>no' . $data[0] . ': ' . mysql_error($link);
        }
    }
}
?>